package com.xxgc.springboot.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @program: springboot
 * @description: 面向切面
 * @author: Mr.abel(ShiJiaYi)
 * @create: 2022-09-15 11:47
 **/
@Slf4j
@Aspect
@Component
public class AopAdvice {

    @Pointcut("execution (* com.xxgc.springboot.controller.UsersController.*(..))")
    public void test() {}
    @Pointcut("execution (* com.xxgc.springboot.controller.UsersController.*(..))")
    public void test1() {}


    @Before("test()")
    public void beforeAdvice() {
        //log.info("有人访问了用户接口");
    }

}
